<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    <%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>

    <title>云链网络商家管理系统</title>
    <%= csrf_meta_tags %>
    <%= stylesheet_link_tag    'admin', media: 'all' %>

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
      <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
    <![endif]-->
  </head>

  <body>

  <section id="container" >
      <!--header start-->
      <header class="header white-bg">
            <div class="sidebar-toggle-box">
                <div data-original-title="Toggle Navigation" data-placement="right" class="icon-reorder fa fa-bars tooltips"></div>
            </div>
            <!--logo start-->
            <%= link_to image_tag("logo.png",style: "height:25px"), merchant_root_path, class: "logo" %>
            <!--logo end-->
            <div class="top-nav ">
                <!--search & user info start-->
                <ul class="nav pull-right top-menu">
                    <li>
                        <input type="text" class="form-control search" placeholder="Search">
                    </li>
                    <!-- user login dropdown start-->
                    <li class="dropdown">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <%= image_tag "avatar1_small.jpg" %>
                            <span class="username"><%= current_merchant.mobile %></span>
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu extended logout">
                            <li><%= link_to "#{fa_icon'key'} Log Out".html_safe, destroy_admin_session_path, :method => :delete %>
                            </a></li>
                        </ul>
                    </li>
                    <!-- user login dropdown end -->
                </ul>
                <!--search & user info end-->
            </div>
        </header>
      <!--header end-->
      <!--sidebar start-->
      <aside>
          <div id="sidebar"  class="nav-collapse ">
              <!-- sidebar menu start-->
              <%= tabs_tag :builder => MenuTabBuilder, :open_tabs => { :id => "nav-accordion", :class => "sidebar-menu" } do |tab| %>
                <%= tab.dashboard  fa_icon("dashboard")+content_tag(:span, '首页'), merchant_root_path %>

                <li class="sub-menu">
                  <a href="javascript:;" class="active">
                      <i class="icon-book"></i>
                      <span>功能设置</span>
                  </a>
                  <ul class="sub">
                    <%= tab.portal_style  fa_icon("puzzle-piece")+content_tag(:span, '主页设置'), merchant_portal_styles_path %>
                    <%= tab.terminal  fa_icon("cog")+content_tag(:span, '终端管理'), merchant_terminals_path %>
                  </ul>
                </li>


                <%= tab.activity  fa_icon("star")+content_tag(:span, '活动'), merchant_activities_path %>
                <%= tab.merchant_info  fa_icon("user")+content_tag(:span, '资料管理'), merchant_merchant_infos_path %>
                <%= tab.shop_info  fa_icon("cloud")+content_tag(:span, '店铺介绍'), shop_info_merchant_merchant_infos_path %>
                <%= tab.auth_token  fa_icon("group")+content_tag(:span, '在线用户'), merchant_auth_tokens_path %>

              <% end %>
              <!-- sidebar menu end-->
          </div>
      </aside>
      <!--sidebar end-->
      <!--main content start-->
      <section id="main-content">
        <section class="wrapper site-min-height">
          <%= gflash %>
          <%= yield :main_content %>
        </section>
      </section>
      <!--main content end-->
      <!--footer start-->
      <footer class="site-footer">
          <div class="text-center">
              浙ICP备11055684号-2 &copy; 2013 云链网络 版权所有
              <a href="#" class="go-top">
                  <%= fa_icon "angle-up" %>
              </a>
          </div>
      </footer>
      <!--footer end-->
  </section>
  
  <%= javascript_include_tag 'admin' %>
  <%= yield :script %>

  <script>

      <%= extend_gritter :time => 2000 %>
      //owl carousel

      $(document).ready(function() {
          $("#owl-demo").owlCarousel({
              navigation : true,
              slideSpeed : 300,
              paginationSpeed : 400,
              singleItem : true,
              autoPlay:true

          });
      });

      //custom select box

      $(function(){
        $('select.styled').customSelect();

        $('input, textarea').placeholder();
      });

  </script>

  </body>
</html>
